package it.blueocean.acanto.taglibrary.jsp.taglib.tags.container;

import it.blueocean.acanto.taglibrary.jsp.taglib.tags.AbstractComponentStateBean;
import it.blueocean.acanto.taglibrary.jsp.taglib.tags.StateBeansManager;
import it.blueocean.acanto.taglibrary.jsp.taglib.tags.exceptions.ComponentStateBeanNotFoundException;

public class ContainerStateBean extends AbstractComponentStateBean
{
	StateBeansManager components_ = new StateBeansManager();

	public void addComponent(AbstractComponentStateBean paramAbstractComponentStateBean)
	{
		this.components_.put(paramAbstractComponentStateBean.getId(), paramAbstractComponentStateBean);
	}

	public AbstractComponentStateBean getComponent(String paramString) throws ComponentStateBeanNotFoundException
	{
		try
		{
			AbstractComponentStateBean localAbstractComponentStateBean = this.components_.getStateBean(paramString);
			return localAbstractComponentStateBean;
		}
		catch (Exception localException)
		{
			throw new ComponentStateBeanNotFoundException(paramString, localException);
		}
	}

	public StateBeansManager getComponents()
	{
		return this.components_;
	}

	public void setComponents(StateBeansManager paramStateBeansManager)
	{
		this.components_ = paramStateBeansManager;
	}

}
